#!/usr/bin/env python
# -*- coding: latin-1 -*-
# -*- coding: cp1252 -*-

strTala = input("ISBN tala: ").replace('-', '')
s1 = []
summa = 0
for x in strTala:
	if x == "X":
		x = "10"
	summa += int(x)
	s1.append(summa)
	
summa = 0
for x in s1:
	summa += x
	
if summa % 11 == 0:
	print("Lögleg")
else:
	print("Ekki lögleg")
